<template>
  <div class="detail">
    <!-- <h1>{{$route.params.name}}</h1>  -->
    <!-- <h1>{{$route.query.name}}</h1> -->
    <!-- <h1>{{$route.params.name}}</h1> -->
    <!-- vcvxvffxcvx -->
    <van-nav-bar
  title="搜索"
  left-text="返回"
 
  left-arrow
  @click-left="onClickLeft"
  @click-right="onClickRight"
/>
    <ul>
      <li v-for="(item, index) in list" :key="index">
        <img :src="item.picUrl" alt="" />
        <div class="zi">
          <div>{{ item.name }}</div>
          <div class="small">
            4.4 月售<span>{{ item.monthSalesTip }}</span>
          </div>
          
          <div class="small peisong">
            <div>
              <span>{{ item.minPriceTip }}</span>
            &nbsp;<span>{{ item.shippingFeeTip }}</span
            ></div>
            <span>配送:{{ item.deliveryTimeTip }}</span>
          </div>
          <div class="small">
            <span>{{ item.averagePriceTip }}</span>
          </div>
          <div class="dspan" >
              <span v-for="(item,index) in item.discounts2 " :key="index" class="smalls">{{item.info}}</span>
          </div>
        </div>
      </li>
    </ul>

    <!-- <div class="list">
              <div class="list-nav">
                   <div class="nav" v-for="(item,index) in list" :key="index"  :class="{active:currentIndex == index}">{{item}}</div>
              </div>
             
              <div class="block" v-for="(item,index) in Arr" :key="index">
              <div><img :src="item.picUrl" alt="" ></div>
                <div class="weng">
                    <span  @click="xiangqing(item)"> {{item.name}}</span>
                    <span>售价：{{item.wmPoiScore}}</span>
                   
                 </div>  
                </div>
          </div> -->
  </div>
</template>

<script>

export default {
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    let searchdata = this.$route.params.searchdata;
    this.list = searchdata;
    console.log("searchdata", searchdata);
    console.log("this.shopinfo", this.shopinfo);
  },
  methods:{
    onClickLeft(){
      this.$router.go(-1)
    }
  }
};
</script>

<style lang="scss" scoped>
* {
  margin: 0;
  padding: 0;
}
ul {
  width: 90%;
  height: 100px;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  margin-left: 20px;
  box-sizing: border-box;
}
ul img {
  width: 100px;
  height: 100px;
  float: left;
  margin-right:10px ;
}
li {
  margin-top: 20px;
}
.zi {
  width: 220px;
  height: 100%;
  float: left;
  //  display: flex;
  //  flex-direction: column;
  //  justify-content: space-between;
}
.small {
  margin-top: 3px;
  font-size: 12px;
  color: #8b8484;
}
.smalls{
  border: 1px solid red ;
  font-size : 12px;
  color:red;
  margin-right: 10px;
  margin-top: 5px;

}
.dspan{
  width: 200px;
  display: flex;
  flex-wrap: wrap;
}
.peisong{
  width: 100%;
  display: flex;
  justify-content: space-between;
}
</style>